using System;
using System.Data;
using System.Collections.Generic;
using System.Collections;
using log4net;
using FSS.BLL.Entities;
namespace FSS.BLL.Services
{
	#region EmployeeService

	/// <summary>
	/// EmployeeService object for Ibatis mapped table 'Employee'.
	/// </summary>
	public class EmployeeService : IEmployeeService
	{
		private static readonly ILog log = LogManager.GetLogger(typeof(EmployeeService).Name);
	  	private static volatile EmployeeService _EmployeeService = null;
        public static EmployeeService GetInstance()
        {
            if (_EmployeeService == null)
            {
                lock (typeof(EmployeeService))
                {
                    if (_EmployeeService == null) // double-check
                        _EmployeeService = new EmployeeService();
                }
            }
            return _EmployeeService;
        }
		public EmployeeService()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public EmployeeEntity InsertExtra(EmployeeEntity objE)
        {
            try
            {
                return ExecuteQueryForObject<EmployeeEntity>("EmployeeInsertExtra", objE);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return null;
            }
        }
        public IList<EmployeeEntity> LoadByUser()
        {
            try
            {
                return ExecuteQueryForList<EmployeeEntity>("EmployeeLoadByUser", null);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return null;
            }
        }
	}
	#endregion  
}
